<div class="main-view">
    <div class="left-margin top-margin"><strong class="am-text-primary am-text-lg">用户情值明细</strong></div>

    <form class="am-form-inline left-margin top-margin" role="form">

        <div  class="top-margin">
            <label>用户:</label> <input type="lable" class="am-form-field" readOnly=true" ng-model="nickName">
            <label>时间:</label>
            <input type="text" id="startDate" class="datepicker" size="12"  style="height: 32px" data-date-format="yyyy-mm-dd">
            <label>至：</label>
            <input type="text" id="endDate" class="datepicker" size="12" style="height: 32px" sdata-date-format="yyyy-mm-dd">
            <button id="search-target" data-am-modal="{target: '#loading'}" type="submit" class="am-btn am-btn-primary left-margin" ng-click="search()" data-target="cascad-search">搜索</button>
        </div>

    </form>
    <div class="am-btn-group am-btn-group-xs left-margin top-margin">
        <!--<button type="button" class="am-btn am-btn-default" data-am-modal="{target: '#doc-modal-add', width: 800, height: 600}"><span class="am-icon-plus"></span>添加奖品</button>-->
        <!--<button type="button" class="am-btn am-btn-default" ng-click="delete()"><span class="am-icon-trash-o"></span> 删除</button>-->
        <button type="button" class="am-btn am-btn-default" ng-click="back()"><span class="am-icon-trash-o"></span> 返回</button>
    </div>
    <div id="pagination" class="pagination"></div>
    <div class="pagination-table left-margin" id="tab_menu" style = "margin-top: 0px;">
        <form class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main">
                <thead>
                <tr>
                    <!--<th class="table-check"><input type="checkbox" ng-click="allSelected()"></th>-->
                    <th class="table-title">类型</th>
                    <th class="table-title">时间</th>
                    <th class="table-title">原因	</th>
                    <th class="table-title">情值</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="result in userList">
                    <!--<td class="table-check"><input type="checkbox" class = "item-check"></td>-->
                    <td>{{result.change_type ? '消耗':'添加'}}</td>
                    <td>{{result.time | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td>{{result.change_reason}}</td>
                    <td>{{result.change_value}}</td>
                </tr>
                </tbody>

            </table>
        </form>
    </div>
    <div class = "left-margin">共<span id = 'page_number'>{{pageNumber}}</span>页 <span>{{count}}条数据</span></div>
</div>

<script>

var fromDate = $('#startDate').datepicker().on('changeDate', function (ev) {
//alert(ev.date.format('yyyy-MM-dd'));
//$scope.startDate=ev.date.format('yyyy-MM-dd');
$("#startDate").val(ev.date.format('yyyy-MM-dd'));
//        alert(ev.date);
});

var toDate = $('#endDate').datepicker().on('changeDate', function (ev) {
// alert(ev.date.format('yyyy-MM-dd'));
//$scope.endDate=ev.date.format('yyyy-MM-dd');
$("#endDate").val(ev.date.format('yyyy-MM-dd'));
});

</script>